package com.tanhua.model.vo;


import com.tanhua.model.db.Options;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OptionsVo implements Serializable {

    private String id;//选项编号

    private Long questionsId;//问卷题目id

    private String option;//选项

    private Integer questionScore;//选项分值

    public static OptionsVo init (Options options){
        OptionsVo optionsVo = new OptionsVo();
        optionsVo.setId(options.getId().toString());
        optionsVo.setQuestionsId(options.getQuestionsId());
        optionsVo.setOption(options.getQuestionOption());
        optionsVo.setQuestionScore(options.getQuestionScore());
        return optionsVo;
    }
}
